AExample usage: External(Grab-Version, "") will return "Troi Grabber Plug-in 1.0".
Important: always use this function to determine if the plug-in is loaded. If the plug-in is not loaded use of external functions may result in data loss, as FileMaker will return an empty field to any external function that is not loaded.
nonej
Grabberu
Grab-Initialisef
Use this function to test if there if a video input source available and initialise it.
Parameters: switches, leave blank or see Rotation/Cropping in this overview
Win: If successful it returns 0.
If unsuccessful it returns and errorcode starting with $$ and the error code. Possible codes are:
This starts the video preview stream at the specified coordinates and dimensions.
Important Use the function "Grab-Initialise" first to test if there if an input source available and initialise it.
Parameters: left and top are the coordinates (in pixels) on the window of the upper left part of the video rectangle. width and heigth give the dimension (in pixels) of the video rectangle.
The results of "Grab-Initialise" are the maximum width and height. To get a proportional smaller image di
[vide the width and height by the same factor.
Example "Grab-Initialise" returned "320|240". If you want a quarter of that image you should use 80|60.
Returns If successful it returns 0. If unsuccessful it returns an errorcode starting with $$ and the error code.
Example usage: External("Grab-StartPreview", "10|100|" & gWidth & "|" & gHeight)
switches
Grabberu
Grab-ImageToClipf
&This puts current image from the video preview on the clipboard.
Important The video preview must be running first.
Parameter: none
Returns If successful it returns 0. If unsuccessful it returns an errorcode starting with $$ and the error code.
Example usage: External("Grab-ImageToClip", "")
none, leave blankj
Grabberu
Grab-DoSettingsDialogf
_This shows the video settings dialog.
Important Mac: The video preview must be running first.
Parameter: switch set to "-video". No other switches are supported at the moment.
Returns If successful it returns 0. If unsuccessful it returns and errorcode starting with $$ and the error code.
Example usage: External("Grab-DoSettingsDialog", "-video")
left|top|width|height
Grabberu
Grab-GetSettingsf
This returns the current video settings.
Important The video preview must be running first.
Parameter: none
Returns If successful it returns the current settings for the video input. If unsuccessful it returns an errorcode starting with $$ and the error code.
The setting is coded, and cant be read. Store the result for later use in (for example) a global field.
Important Do not change these values. Only store them so you can reset them later.
Example usage: SetField[ gGrabberSettings, ExB"ternal("Grab-GetSettings", "" ) ]
none, leave blankj
Grabberu
Grab-SetSettingsf
switch
Grabberu
e Grab-Stopf
1hMThis stops the video preview stream.
Example usage: External("Grab-Stop", "")i
none, leave blankj
Grabberu
Grab-AquireToClipf
eThis shows the aquire dialog box. The live video image preview is shown in a separate window. There you can click on the
Aquire image
button. The image is put on the clipboard.
Parameter: none
Returns If successful it returns 0. If unsuccessful it returns an errorcode starting with $$ and the error code.
Example usage: External("Grab-AquireToClip", "")
none, leave blankj
Grabberu
Rotation/Cropping
This sets the video settings to the given video settings.
Important The video preview must be running first.
Parameter: videoSettings Use only a video setting you got as a result from "Grab-GetSettings"
Returns If successful it returns 0. If unsuccessful it returns an errorcode starting with $$ and the error code.
Important Do not use changed settings.
Example usage: External("Grab-SetSettings", gGrabberSettings)
videoSettings
On Mac OS Only.
It is now possible to rotate and to crop the image. For this you need to be able to grab ofscreen. You can do this by specifying the use an offscreen Gworld.
See the user manual for more info.j
Grabberu
Grab-SetRotationf
"This tells the grabber how to rotate the video preview.
Parameters: rotationangle is the number of degrees the image must be rotated. The rotation can only be 90, -90 and 180.
Returns If successful it returns 0. If unsuccessful it returns an error code starting with $$ and the error code.
rotationanglej
Grabberu
Grab-DisplayCropRectf
Grabberu
This tells the grabber show a cropping rectangle on the video source.
Parameters: coordinates are relative to the video source: left and top are the coordinates (in pixels) in the source of the upper left part of the rectangle. width and heigth give the dimension (in pixels) of the rectangle.
Returns If successful it returns 0. If unsuccessful it returns an errorcode starting with $$ and the error code.